home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus Leser 19 / Amiga Plus Leser CD 19.iso / Tools / MorphOS / cvs-1.11.2 / source / amiga / ssh / ssh_protocol.h < prev    next >
Encoding:
C/C++ Source or Header  |  2002-11-18  |  1.2 KB  |  44 lines

  1. /*
  2.  * $Id$
  3.  *
  4.  * :ts=4
  5.  */
  6.  
  7. #ifndef _SSH_PROTOCOL_H
  8. #define _SSH_PROTOCOL_H
  9.  
  10. /****************************************************************************/
  11.  
  12. #include "ssh.h"
  13. #include "des.h"
  14. #include "blowfish.h"
  15.  
  16. /****************************************************************************/
  17.  
  18. struct ssh_protocol_context
  19. {
  20.     int                spc_Socket;
  21.     struct Packet    spc_PacketIn;
  22.     struct Packet    spc_PacketOut;
  23.     unsigned char    spc_InBuf[INBUF_SIZE];
  24.     int                spc_UseCipher;
  25.     int                spc_CipherType;
  26.     DESCon            spc_Keys[3];
  27.     BlowfishContext    spc_EncryptContext;
  28.     BlowfishContext    spc_DecryptContext;
  29.     int                spc_BytesLeft;
  30.     unsigned char *    spc_Ptr;
  31. };
  32.  
  33. /****************************************************************************/
  34.  
  35. void ssh_disconnect(struct ssh_protocol_context *spc);
  36. struct ssh_protocol_context *ssh_connect(char *remote_host_name, int port_number, char *user_name, char *password, int cipher_type);
  37. int ssh_execute_cmd(struct ssh_protocol_context *spc,char *command);
  38. int ssh_write(struct ssh_protocol_context *spc, void *data, int len);
  39. int ssh_read(struct ssh_protocol_context *spc, void *data, int len);
  40.  
  41. /****************************************************************************/
  42.  
  43. #endif /* _SSH_PROTOCOL_H */
  44.